
const path = require('path')

module.exports = {
    babel: {   //用来支持装饰器
        plugins: [["@babel/plugin-proposal-decorators", { legacy: true }]]
    },
    webpack: {
        alias: {
            assets: path.resolve(__dirname, './src/assets'),
            components: path.resolve(__dirname, './src/components'),
            pages: path.resolve(__dirname, './src/pages'),
            common: path.resolve(__dirname, './src/common'),
            "@": path.resolve(__dirname, './src')
        }
    },
    devServer: {
        proxy: {
            "/api": {
                target: "http://chst.vip",
                pathRewrite: {
                    "^/api": ""
                }
            }
        }
    }
}

